package com.cxf.windex.controller;

import com.cxf.windex.base.rest.BaseController;
import com.cxf.windex.enums.TypeEnums;
import java.util.Map;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @author chenxf
 * @date 3/8/2018
 * @description
 */
@Controller
@RequestMapping("")
public class HomeController extends BaseController {


  @RequestMapping(value = "/",method = RequestMethod.GET)
  public String home(Map<String,Object> map){
    return "admin/login";
  }

  @RequestMapping(value = "about",method = RequestMethod.GET)
  public String about(Map<String,Object> map){
    return "about";
  }

  @RequestMapping(value = "index",method = RequestMethod.GET)
  public String index(Map<String,Object> map){
    map.put("typeId", getCurrentUserType());
    map.put("user", getCurrentName());
    return "admin/index";
  }
  @RequestMapping(value = "register",method = RequestMethod.GET)
  public String register(Map<String,Object> map){
    return "admin/register";
  }
  @RequestMapping(value = "home",method = RequestMethod.GET)
  public String bHome(Map<String,Object> map){
    map.put("typeId", getCurrentUserType());
    return "admin/home";
  }

  @RequestMapping(value = "login",method = RequestMethod.GET)
  public String login(Map<String,Object> map){
    return "admin/login";
  }

  @RequestMapping(value = "reset_pwd",method = RequestMethod.GET)
  public String pwd(Map<String,Object> map){
    return "admin/pwd";
  }

  @RequestMapping(value = "zl",method = RequestMethod.GET)
  public String zl(Map<String,Object> map){
    return "admin/zl";
  }

}
